From cb359ce6b112ea4c2e7becfa60b50ced2f0d8033 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 2 Apr 2008 15:30:26 +0100 Subject: [PATCH] ioemu: advertise write cache as enabled only when it actually is. Signed-off-by: Samuel Thibault --- tools/ioemu/hw/ide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ioemu/hw/ide.c b/tools/ioemu/hw/ide.c index cfe3e8a5b2..c8df301b39 100644 --- a/tools/ioemu/hw/ide.c +++ b/tools/ioemu/hw/ide.c @@ -660,7 +660,7 @@ static void ide_identify(IDEState *s) put_le16(p + 83, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10)); put_le16(p + 84, (1 << 14)); /* 14=nop 5=write_cache */ - put_le16(p + 85, (1 << 14) | (1 << 5)); + put_le16(p + 85, (1 << 14) | (s->write_cache << 5)); /* 13=flush_cache_ext,12=flush_cache,10=lba48 */ put_le16(p + 86, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10)); put_le16(p + 87, (1 << 14)); -- 2.30.2